import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    meetingId: "",
    salesName: "",
    meetingMsg: {}
  },
  mutations: {
    setMeetingId: (state, payload) => {
      state.meetingId = payload;
      sessionStorage.setItem("meetingId", JSON.stringify(payload));
    },
    setMeetingMsg: (state, payload) => {
      state.meetingMsg = payload;
      sessionStorage.setItem("meetingMsg", JSON.stringify(payload));
    },
    setSalesName: (state, payload) => {
      state.salesName = payload;
      sessionStorage.setItem("salesName", JSON.stringify(payload));
    }
  },
  actions: {},
  modules: {}
});
